#基础镜像
FROM tomcat:alpine

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

COPY docker/wait-for.sh /
RUN chmod +x /wait-for.sh

WORKDIR /usr/local/tomcat/webapps/
RUN rm -rf *

#把你的项目war包引入到tomcat目录下
COPY target/*.war ROOT.war

#Expose http port
EXPOSE 8080

CMD ["/usr/local/tomcat/bin/catalina.sh", "run"]
